﻿<phone:PhoneApplicationPage 
    x:Class="Sina.Altman.Weibo.Client.View.HomePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="DataTemplateLB">
            <Grid Margin="12,0,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="60" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="30" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="60" />
                    <ColumnDefinition Width="360" />
                </Grid.ColumnDefinitions>

                <Image x:Name="userImg" Grid.Row="0" Grid.Column="0" Height="50" Width="50" Source="{Binding User.ProfileImageUrl}" />
                <TextBlock x:Name="userTB" Grid.Row="0" Grid.Column="1" Text="{Binding User.ScreenName}" VerticalAlignment="Bottom" HorizontalAlignment="Left" FontSize="24" Margin="4,0,0,8" />
                <TextBlock x:Name="userTextTB" Grid.Row="1" Grid.Column="1" TextWrapping="Wrap"  Text="{Binding Text}" FontSize="21.333"/>
                <TextBlock x:Name="sourceTB" Grid.Row="2" Grid.Column="1" Text="{Binding Source}" FontSize="21.333" VerticalAlignment="Bottom" HorizontalAlignment="Left" />

            </Grid>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>
    
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <ListBox x:Name="timelineLB" ItemTemplate="{StaticResource DataTemplateLB}" />
    </Grid>
 
</phone:PhoneApplicationPage>
